<template>
    <!-- <input type="text" placeholder="请输入给子组件的ID 按回车确认" v-model="content" @keydown.enter="btnId()" style="width: 200px;">
    <div>
        <RouterLink to="/parent/child1">子组件1</RouterLink>
        <RouterLink to="/parent/child2">子组件2</RouterLink>
    </div> -->
    我是你爸爸
    <router-link to="/parent/child">看看儿子</router-link>
    <router-view></router-view>
</template>
<script setup>
import { ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
let content = ref()
let route = useRouter()
let curRoute = useRoute()
let curPath = curRoute.fullPath
function btnId() {
    console.log(content.value);
    route.push(`${curPath}/${content.value}`)

}
</script>